//
//  UModel.swift
//  u17Comic
//
//  Created by hujian on 2019/7/9.
//  Copyright © 2019 hujian. All rights reserved.
//

import Foundation
import HandyJSON


//MARK: 发现
struct ExtModel: HandyJSON {
    var key: String?
    var val: String?
}
struct GalleryItemModel: HandyJSON {
    var id: Int = 0
    var linkType: Int = 0
    var cover: String?
    var ext: [ExtModel]?
    var title: String?
    var content: String?
    var topCover:String?
}

struct ModuleInfo :HandyJSON {
    var argName: String?
    var argValue: Int = 0
    var title: String?
    var icon: String?
    var bgCover: String?
    
}
struct Items :HandyJSON {
    var title: String?
    var subTitle: String?
    var comicId: Int = 0
    var cover: String?
    var updateType: Int = 0
    
}
struct Modules :HandyJSON {
    var moduleInfo: ModuleInfo?
    var items: [[Items]]?
    var moduleType: Int = 0
    var uiType: Int = 0
    
}
struct DiscoveryModel: HandyJSON {
    var galleryItems: [GalleryItemModel]?
    var modules: [Modules]?
    var editTime: TimeInterval = 0
    var defaultSearch: String?
}


//MARK: 其他
extension Array: HandyJSON{}

struct ReturnData<T: HandyJSON>: HandyJSON {
    var message:String?
    var returnData: T?
    var stateCode: Int = 0
}

struct ResponseData<T: HandyJSON>: HandyJSON {
    var code: Int = 0
    var data: ReturnData<T>?
}
